//
//  LeftViewTableViewCell.m
//  Tour
//
//  Created by 张张烨 on 16/3/11.
//  Copyright © 2016年 张中烨. All rights reserved.
//

#import "LeftViewTableViewCell.h"
#define kCellWidth self.contentView.frame.size.width
#define kCellHeight self.contentView.frame.size.height

@interface LeftViewTableViewCell ()
@property (nonatomic,retain)UILabel *titleLabel;
@property (nonatomic,retain)UIView *happyView;
@end
@implementation LeftViewTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.contentView setBackgroundColor:[UIColor blackColor]];
        
        self.happyView = [[UIView alloc]init];
        [self.happyView setBackgroundColor:[UIColor blueColor]];
        [self addSubview:self.happyView];
      
        
        self.titleLabel = [[UILabel alloc]init];
        [self.titleLabel setTextColor:[UIColor whiteColor]];
        [self.titleLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:14]];
        [self.contentView addSubview:self.titleLabel];
     
    }
    return self;
}
- (void)setTitleContent:(NSString *)titleContent{
  
        _titleContent = titleContent;
        [self.titleLabel setText:_titleContent];
    
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [self.happyView setFrame:CGRectMake(14 * KUAN, 13 * GAO, 3 * KUAN,kCellHeight - (26 * GAO ))];
    [self.titleLabel setFrame:CGRectMake(20 * KUAN, 0, kCellWidth - (20 * KUAN), kCellHeight)];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
